<button class="btn btn-default" ng-init="isAddFormCollapsed = true" ng-click="isAddFormCollapsed = !isAddFormCollapsed">
    增加用户
</button>
<form name="newUserForm"
      ng-submit="create()"
      collapse="isAddFormCollapsed"
      role="form">

    <div class="form-group">
        <label>name</label>
        <input type="text"
               ng-model="user.name"
               class="form-control"
               required="">
    </div>

    <div class="form-group">
        <label>nickName</label>
        <input type="text"
               ng-model="user.nickName"
               class="form-control"
               required="">
    </div>

    <div class="form-group">
        <label>password</label>
        <input type="password"
               ng-model="user.password"
               class="form-control">
    </div>

    <div class="form-group">
        <label>email</label>
        <input type="email"
               ng-model="user.email"
               class="form-control"
               required="">
    </div>

    <div class="form-group">
        <div class="btn-group">
            <label class="btn btn-primary" ng-model="user.provider" btn-radio="'ldap'">LDAP</label>
            <label class="btn btn-primary" ng-model="user.provider" btn-radio="'standard'">Standard</label>
        </div>
    </div>

    <input type="submit"
           class="btn btn-success"
           ng-disabled="newUserForm.$invalid">
</form>

<h3>Users:</h3>
<form role="form">
    <div class="form-group">
        <div class="input-group">
            <div class="input-group-addon"><i class="glyphicon glyphicon-search"></i></div>
            <input type="text" class="form-control" placeholder="Search" ng-model="search.$">
        </div>
    </div>
</form>

<table class="table table-striped">

    <thead>
    <tr>
        <th>name</th>
        <th>nickName</th>
        <th>email</th>
        <th>provider</th>

    </tr>
    </thead>

    <tr ng-repeat="user in users | filter:search | orderBy:'name'">
        <td>{{user.name}}</td>
        <td>{{user.nickName}}</td>
        <td>{{user.email}}</td>
        <td>{{user.provider}}</td>

        <td>
            <button class="btn btn-default" ng-click="popUpdateUserModal(user)">修改信息
            </button>
        </td>

        <td>
            <button class="btn btn-default" ng-click="popUpdateUserPasswordModal(user)">修改密码
            </button>
        </td>

        <td>
            <button class="btn btn-danger danger" ng-really-click="delete(user.id)">Delete</button>
        </td>

    </tr>
</table>